import request from '@/config/axios'

export interface ProductionProportionVO {
  orderNumber: string
  dictOrderType: number
  customerName: string
  customerCode: string
  productNumber: string
  productName: string
  productStandard: string
  orderQuantity: number
  dictProportionStatus: number
}

// 查询生产管理-产品占比列表
export const getProductionProportionPage = async (params) => {
  return await request.get({ url: `/produce/production-proportion/page`, params })
}

// 查询生产管理-产品占比详情
export const getProductionProportion = async (id: number) => {
  return await request.get({ url: `/produce/production-proportion/get?id=` + id })
}

// 新增生产管理-产品占比
export const createProductionProportion = async (data: ProductionProportionVO) => {
  return await request.post({ url: `/produce/production-proportion/create`, data })
}

// 修改生产管理-产品占比
export const updateProductionProportion = async (data: ProductionProportionVO) => {
  return await request.put({ url: `/produce/production-proportion/update`, data })
}

// 删除生产管理-产品占比
export const deleteProductionProportion = async (id: number) => {
  return await request.delete({ url: `/produce/production-proportion/delete?id=` + id })
}

// 导出生产管理-产品占比 Excel
export const exportProductionProportion = async (data) => {
  return await request.download({ url: `/produce/production-proportion/export-excel`, data })
}
